/*
 * @Author: HeAo
 * @Date: 2021-11-05 09:44:43
 * @LastEditTime: 2021-11-05 11:15:04
 * @LastEditors: HeAo
 * @Description: 
 * @FilePath: \web2103-2105\web2103code\4-1-Nodejs\day06\init\config\config.default.js
 * 别乱动！
 */
/* eslint valid-jsdoc: "off" */

'use strict';

/**
 * @param {Egg.EggAppInfo} appInfo app info
 */
module.exports = appInfo => {
  /**
   * built-in config
   * @type {Egg.EggAppConfig}
   **/
  const config = exports = {};

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1636076660297_1846';

  // add your middleware config here
  config.middleware = [];

  // add your user config here
  const userConfig = {
    mysql: {
      client: {
        host: 'localhost',
        port: '3306',
        user: 'briup',
        password: 'briupSH',
        database: 'briup-sc-03',
      },
      // 是否加载到 app 上，默认开启
      app: true,
      // 是否加载到 agent 上，默认关闭
      agent: false,
    },
    security: {
      csrf: {
        enable: false,
      },
    }
  };

  return {
    ...config,
    ...userConfig,
  };
};
